/**
 * 地区选择器初始化
 */
 function picker() {
    new Picker({
        title: "请滑动屏幕选择", //标题(可选)
        defaultValue: `${global_province} ${global_city}`, //默认值-多个以空格分开（可选）
        data: cityData, //数据(必传)
        type: 2,
        keys: {
            id: "code",
            value: "name",
            childData: "level", //最多3级联动
        }, //数组内的键名称(必传，id、text、data)
        callBack: function(val) {
            //回调函数（val为选择的值）
            let city = val.split(" ");
            let qu = '';
            if (city[1] != '') {
                $('#sheng').val(city[0]);
                $('#shi').val(city[1]);
                let citycode = shiData[city[0]]["citylist"][city[1]]["code"];
                if (citycode == 'sz') {
                    window.location.href = "http://m.bendibao.com/news/holidayarrange/";
                } else {
                    window.location.href = "http://m." + citycode + ".bendibao.com/news/holidayarrange/";
                }
            }
        },
    });
}